package com.ruoyi.animal.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.animal.mapper.AnimalInformationHistoryMapper;
import com.ruoyi.animal.domain.AnimalInformationHistory;
import com.ruoyi.animal.service.IAnimalInformationHistoryService;

/**
 * 动物信息回溯Service业务层处理
 * 
 * @author gw
 * @date 2025-01-15
 */
@Service
public class AnimalInformationHistoryServiceImpl implements IAnimalInformationHistoryService 
{
    @Autowired
    private AnimalInformationHistoryMapper animalInformationHistoryMapper;


    /**
     * 查询动物信息回溯
     * 
     * @param historyId 动物信息回溯主键
     * @return 动物信息回溯
     */
    @Override
    public AnimalInformationHistory selectAnimalInformationHistoryByHistoryId(Long historyId)
    {
        return animalInformationHistoryMapper.selectAnimalInformationHistoryByHistoryId(historyId);
    }

    @Override
    public List<AnimalInformationHistory> selectAnimalInformationHistoryByAnimalId(Long animalId) {
        return animalInformationHistoryMapper.selectAnimalInformationHistoryByAnimalId(animalId);
    }

    /**
     * 查询动物信息回溯列表
     * 
     * @param animalInformationHistory 动物信息回溯
     * @return 动物信息回溯
     */
    @Override
    public List<AnimalInformationHistory> selectAnimalInformationHistoryList(AnimalInformationHistory animalInformationHistory)
    {
        return animalInformationHistoryMapper.selectAnimalInformationHistoryList(animalInformationHistory);
    }

    /**
     * 新增动物信息回溯
     * 
     * @param animalInformationHistory 动物信息回溯
     * @return 结果
     */
    @Override
    public int insertAnimalInformationHistory(AnimalInformationHistory animalInformationHistory)
    {
        return animalInformationHistoryMapper.insertAnimalInformationHistory(animalInformationHistory);
    }

    /**
     * 修改动物信息回溯
     * 
     * @param animalInformationHistory 动物信息回溯
     * @return 结果
     */
    @Override
    public int updateAnimalInformationHistory(AnimalInformationHistory animalInformationHistory)
    {
        return animalInformationHistoryMapper.updateAnimalInformationHistory(animalInformationHistory);
    }

    /**
     * 批量删除动物信息回溯
     * 
     * @param historyIds 需要删除的动物信息回溯主键
     * @return 结果
     */
    @Override
    public int deleteAnimalInformationHistoryByHistoryIds(Long[] historyIds)
    {
        return animalInformationHistoryMapper.deleteAnimalInformationHistoryByHistoryIds(historyIds);
    }

    /**
     * 删除动物信息回溯信息
     * 
     * @param historyId 动物信息回溯主键
     * @return 结果
     */
    @Override
    public int deleteAnimalInformationHistoryByHistoryId(Long historyId)
    {
        return animalInformationHistoryMapper.deleteAnimalInformationHistoryByHistoryId(historyId);
    }
}
